package net.entelijan.cobean.examples.util;

import java.util.Date;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class NestedBean {

	private int intVal;

	private String stringVal;

	private Date dateVal;

	private NestedBean beanVal;

	public NestedBean() {
		super();
	}

	public NestedBean(int intVal, String stringVal, Date dateVal,
			NestedBean beanVal) {
		super();
		this.intVal = intVal;
		this.stringVal = stringVal;
		this.dateVal = dateVal;
		this.beanVal = beanVal;
	}

	public int getIntVal() {
		return intVal;
	}

	public void setIntVal(int intVal) {
		this.intVal = intVal;
	}

	public String getStringVal() {
		return stringVal;
	}

	public void setStringVal(String stringVal) {
		this.stringVal = stringVal;
	}

	public NestedBean getBeanVal() {
		return beanVal;
	}

	public void setBeanVal(NestedBean beanVal) {
		this.beanVal = beanVal;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.SHORT_PREFIX_STYLE);
	}

	@Override
	public boolean equals(Object obj) {
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	@Override
	public int hashCode() {
		return HashCodeBuilder.reflectionHashCode(this);
	}

	public Date getDateVal() {
		return dateVal;
	}

	public void setDateVal(Date dateVal) {
		this.dateVal = dateVal;
	}
}
